package com.bytezero.test2;

public class Person
{
	private int age;
	 
	public void setAge(int a)
	{
		if(a <=0 || a> 130)
		{
			//throw new RuntimeException("传入的数据非法！！");
			System.out.println("传入的数据非法！！");
			
			//return;   1:
		}
	
			//age = a;  1:
		
		else
		{
			age = a;
		}
	}
	
	public int getAge()
	{
		return  age;
	
		
	}
	
	//不行
//	public int doAge(int a)
//	{
//		age =a;
//		return age;
//	}
	
	
	
	
	
	
	
}
















